Skip to content

Conversation

@tommaso-moro
Copy link
Contributor

@tommaso-moro tommaso-moro commented Nov 11, 2025

Overview

This PR adds support for tool-specific MCP configuration via a new --tools flag:

  • Users can use the --tools to list which tools they would like to enable
  • Users can also use a mix of --tools, --toolsets, --read-only and --dynamic-toolsets and compose them in whatever way they'd like

Example

Screenshot 2025-11-20 at 10 48 21

@tommaso-moro tommaso-moro marked this pull request as ready for review November 21, 2025 09:21
@tommaso-moro tommaso-moro requested a review from a team as a code owner November 21, 2025 09:21
Copilot AI review requested due to automatic review settings November 21, 2025 09:21
Copilot finished reviewing on behalf of tommaso-moro November 21, 2025 09:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces tool-specific configuration support via a new --tools flag, enabling users to specify individual tools instead of (or in addition to) toolsets. Users can now compose their MCP server configuration using --tools, --toolsets, --read-only, and --dynamic-toolsets flags in any combination.

Key changes:

  • Added --tools flag for specifying individual tools by name
  • Implemented additive composition logic where tools and toolsets can be combined
  • Maintained read-only mode enforcement (write tools are skipped even if explicitly requested)

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/toolsets/toolsets.go Added ToolDoesNotExistError, FindToolByName method to locate tools across all toolsets, and RegisterSpecificTools method to register individual tools with read-only mode support
pkg/github/tools.go Added CleanTools utility function to remove duplicates and trim whitespace from tool names
internal/ghmcp/server.go Added EnabledTools field to both MCPServerConfig and StdioServerConfig, updated NewMCPServer to handle tool registration additively with toolsets
cmd/github-mcp-server/main.go Added --tools flag, viper binding for the flag, and updated default toolset logic to only apply when neither tools nor toolsets are specified
go.mod Marked github.com/google/go-querystring as indirect dependency
README.md Added comprehensive documentation for --tools flag including examples with command line, environment variables, Docker usage, and composition patterns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants